\(\int (a+b x) \cosh (c+d x) \, dx\) [4]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 28 \[ \int (a+b x) \cosh (c+d x) \, dx=-\frac {b \cosh (c+d x)}{d^2}+\frac {(a+b x) \sinh (c+d x)}{d} \]

[Out]

-b*cosh(d*x+c)/d^2+(b*x+a)*sinh(d*x+c)/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3377, 2718} \[ \int (a+b x) \cosh (c+d x) \, dx=\frac {(a+b x) \sinh (c+d x)}{d}-\frac {b \cosh (c+d x)}{d^2} \]

[In]

Int[(a + b*x)*Cosh[c + d*x],x]

[Out]

-((b*Cosh[c + d*x])/d^2) + ((a + b*x)*Sinh[c + d*x])/d

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3377

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(-(c + d*x)^m)*(Cos[e + f*x]/f), x]
+ Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {(a+b x) \sinh (c+d x)}{d}-\frac {b \int \sinh (c+d x) \, dx}{d} \\ & = -\frac {b \cosh (c+d x)}{d^2}+\frac {(a+b x) \sinh (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 27, normalized size of antiderivative = 0.96 \[ \int (a+b x) \cosh (c+d x) \, dx=\frac {-b \cosh (c+d x)+d (a+b x) \sinh (c+d x)}{d^2} \]

[In]

Integrate[(a + b*x)*Cosh[c + d*x],x]

[Out]

(-(b*Cosh[c + d*x]) + d*(a + b*x)*Sinh[c + d*x])/d^2

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.32

method result size
parts \(\frac {b x \sinh \left (d x +c \right )}{d}+\frac {a \sinh \left (d x +c \right )}{d}-\frac {b \cosh \left (d x +c \right )}{d^{2}}\) \(37\)
parallelrisch \(\frac {-2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right ) d \left (b x +a \right )+2 b}{d^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}\) \(40\)
risch \(\frac {\left (d x b +d a -b \right ) {\mathrm e}^{d x +c}}{2 d^{2}}-\frac {\left (d x b +d a +b \right ) {\mathrm e}^{-d x -c}}{2 d^{2}}\) \(47\)
derivativedivides \(\frac {\frac {b \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d}-\frac {b c \sinh \left (d x +c \right )}{d}+a \sinh \left (d x +c \right )}{d}\) \(53\)
default \(\frac {\frac {b \left (\left (d x +c \right ) \sinh \left (d x +c \right )-\cosh \left (d x +c \right )\right )}{d}-\frac {b c \sinh \left (d x +c \right )}{d}+a \sinh \left (d x +c \right )}{d}\) \(53\)
meijerg \(-\frac {2 b \cosh \left (c \right ) \sqrt {\pi }\, \left (-\frac {1}{2 \sqrt {\pi }}+\frac {\cosh \left (d x \right )}{2 \sqrt {\pi }}-\frac {d x \sinh \left (d x \right )}{2 \sqrt {\pi }}\right )}{d^{2}}+\frac {b \sinh \left (c \right ) \left (\cosh \left (d x \right ) x d -\sinh \left (d x \right )\right )}{d^{2}}+\frac {a \cosh \left (c \right ) \sinh \left (d x \right )}{d}-\frac {a \sinh \left (c \right ) \sqrt {\pi }\, \left (\frac {1}{\sqrt {\pi }}-\frac {\cosh \left (d x \right )}{\sqrt {\pi }}\right )}{d}\) \(95\)

[In]

int((b*x+a)*cosh(d*x+c),x,method=_RETURNVERBOSE)

[Out]

b*x*sinh(d*x+c)/d+a*sinh(d*x+c)/d-b*cosh(d*x+c)/d^2

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int (a+b x) \cosh (c+d x) \, dx=-\frac {b \cosh \left (d x + c\right ) - {\left (b d x + a d\right )} \sinh \left (d x + c\right )}{d^{2}} \]

[In]

integrate((b*x+a)*cosh(d*x+c),x, algorithm="fricas")

[Out]

-(b*cosh(d*x + c) - (b*d*x + a*d)*sinh(d*x + c))/d^2

Sympy [A] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.64 \[ \int (a+b x) \cosh (c+d x) \, dx=\begin {cases} \frac {a \sinh {\left (c + d x \right )}}{d} + \frac {b x \sinh {\left (c + d x \right )}}{d} - \frac {b \cosh {\left (c + d x \right )}}{d^{2}} & \text {for}\: d \neq 0 \\\left (a x + \frac {b x^{2}}{2}\right ) \cosh {\left (c \right )} & \text {otherwise} \end {cases} \]

[In]

integrate((b*x+a)*cosh(d*x+c),x)

[Out]

Piecewise((a*sinh(c + d*x)/d + b*x*sinh(c + d*x)/d - b*cosh(c + d*x)/d**2, Ne(d, 0)), ((a*x + b*x**2/2)*cosh(c
), True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 68 vs. \(2 (28) = 56\).

Time = 0.21 (sec) , antiderivative size = 68, normalized size of antiderivative = 2.43 \[ \int (a+b x) \cosh (c+d x) \, dx=\frac {a e^{\left (d x + c\right )}}{2 \, d} + \frac {{\left (d x e^{c} - e^{c}\right )} b e^{\left (d x\right )}}{2 \, d^{2}} - \frac {{\left (d x + 1\right )} b e^{\left (-d x - c\right )}}{2 \, d^{2}} - \frac {a e^{\left (-d x - c\right )}}{2 \, d} \]

[In]

integrate((b*x+a)*cosh(d*x+c),x, algorithm="maxima")

[Out]

1/2*a*e^(d*x + c)/d + 1/2*(d*x*e^c - e^c)*b*e^(d*x)/d^2 - 1/2*(d*x + 1)*b*e^(-d*x - c)/d^2 - 1/2*a*e^(-d*x - c
)/d

Giac [A] (verification not implemented)

none

Time = 0.61 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.64 \[ \int (a+b x) \cosh (c+d x) \, dx=\frac {{\left (b d x + a d - b\right )} e^{\left (d x + c\right )}}{2 \, d^{2}} - \frac {{\left (b d x + a d + b\right )} e^{\left (-d x - c\right )}}{2 \, d^{2}} \]

[In]

integrate((b*x+a)*cosh(d*x+c),x, algorithm="giac")

[Out]

1/2*(b*d*x + a*d - b)*e^(d*x + c)/d^2 - 1/2*(b*d*x + a*d + b)*e^(-d*x - c)/d^2

Mupad [B] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.25 \[ \int (a+b x) \cosh (c+d x) \, dx=\frac {a\,\mathrm {sinh}\left (c+d\,x\right )+b\,x\,\mathrm {sinh}\left (c+d\,x\right )}{d}-\frac {b\,\mathrm {cosh}\left (c+d\,x\right )}{d^2} \]

[In]

int(cosh(c + d*x)*(a + b*x),x)

[Out]

(a*sinh(c + d*x) + b*x*sinh(c + d*x))/d - (b*cosh(c + d*x))/d^2